<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>BlazorWebassemblyMultiPagesTab</title>
    <base href="/" />
    <link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
    <link href="css/app.css" rel="stylesheet" />
    <link href="BlazorWebassemblyMultiPagesTab.Client.styles.css" rel="stylesheet" />
</head>

<body>
    <div id="app">Loading...</div>

    <div id="blazor-error-ui">
        An unhandled error has occurred.
        <a href="" class="reload">Reload</a>
        <a class="dismiss">🗙</a>
    </div>
    <script src="_framework/blazor.webassembly.js"></script>
    <script>
        window.AddTab = (title, url) => {
            if (parent && parent != this) {
                parent.DotNet.invokeMethod('BlazorApp9.Client', "AddTab", title, url);
            } else {
                window.open(url);
            }

        };

        window.GoTo = (title, url) => {
            if (parent && parent != this) {
                parent.DotNet.invokeMethod('BlazorApp9.Client', "GoTo", title, url);
            } else {
                location.href = url;
            }

        };
        window.CloseTab = (title, url) => {
            if (parent && parent != this) {
                parent.DotNet.invokeMethod('BlazorApp9.Client', "CloseTab");
            } else {
                window.close();
            }

        };

        window.GetTabWidth = (index) => {
            var lst = document.querySelectorAll('.middletab-tabs li');
            if (lst.length > index) {
                return lst[index].offsetWidth;
            }
            return 0;
        }
        window.GetWidth = (query) => {
            var obj = document.querySelector(query);
            if (obj) {
                return obj.offsetWidth;
            }
            return 0;
        }
    </script>
</body>

</html>
